package se.webbzon.boltzmann.inflatorgroup;

import java.util.ArrayList;

import se.webbzon.boltzmann.battle.object.spawner.BattleSpawnerInflator;
import se.webbzon.boltzmann.camera.FixedCameraInflator;
import se.webbzon.boltzmann.environment.AbstractEnvironment;
import se.webbzon.boltzmann.game.object.action.SequenceActionInflator;
import se.webbzon.boltzmann.game.object.item.GameItemContainerInflator;
import se.webbzon.boltzmann.game.object.item.GameItemInflator;
import se.webbzon.boltzmann.game.object.pickup.MathNoteInflator;
import se.webbzon.boltzmann.game.object.pickup.PickupInflator;
import se.webbzon.boltzmann.game.object.pickup.RestorationInflator;
import se.webbzon.boltzmann.game.object.platform.PlatformInflator;
import se.webbzon.boltzmann.game.object.platform.PlatformShadowInflator;
import se.webbzon.boltzmann.game.object.player.AbstractPlayerCharacterFactory;
import se.webbzon.boltzmann.game.object.portal.DoorPortalInflator;
import se.webbzon.boltzmann.game.object.portal.RoadPortalInflator;
import se.webbzon.boltzmann.game.object.portal.SavePortalInflator;
import se.webbzon.boltzmann.game.object.portal.SimplePortalInflator;
import se.webbzon.boltzmann.game.object.spawner.FriendlyNPCSpawnerInflator;
import se.webbzon.boltzmann.game.object.trigger.SequenceTriggerInflator;
import se.webbzon.boltzmann.game.object.waypoint.TargetInflator;
import se.webbzon.boltzmann.game.object.waypoint.WaypointInflator;
import se.webbzon.boltzmann.game.sequence.builder.DefaultSequenceRowInflatorGroup;
import se.webbzon.boltzmann.object.background.BackgroundInflator;
import se.webbzon.boltzmann.object.cinema.CameraNodeFactory;
import se.webbzon.boltzmann.object.factory.InstanceFactory;
import se.webbzon.boltzmann.object.factory.InstanceFactoryGroup;
import se.webbzon.boltzmann.object.factory.InstanceFactoryInflator;
import se.webbzon.boltzmann.object.geometry.GeometryInflator;
import se.webbzon.boltzmann.object.light.DirectionalLightInflator;

public abstract class DefaultInflatorGroup extends EnvironmentInflatorGroup {
	
	/*============================================================
	Public Methods
	============================================================*/
	
	@Override public void initialize(AbstractEnvironment env) throws Exception {
		// Create a factory group for the factory inflator 
		ArrayList<InstanceFactory> factories = new ArrayList<InstanceFactory>();
		factories.add(new AbstractPlayerCharacterFactory());
		factories.add(new CameraNodeFactory());
		InstanceFactoryGroup factoryGroup = new InstanceFactoryGroup(factories);

		// Add all the inflators to this group
		addInflator(new InstanceFactoryInflator(env,factoryGroup));
		addInflator(new GeometryInflator(env));
		addInflator(new DirectionalLightInflator(env));
		addInflator(new RoadPortalInflator(env));
		addInflator(new DoorPortalInflator(env));
		addInflator(new BattleSpawnerInflator(env));
		addInflator(new WaypointInflator(env));
		addInflator(new PlatformInflator(env));
		addInflator(new PlatformShadowInflator(env));
		addInflator(new SequenceActionInflator(env,new DefaultSequenceRowInflatorGroup()));
		addInflator(new SequenceTriggerInflator(env,new DefaultSequenceRowInflatorGroup()));
		addInflator(new BackgroundInflator(env));
		addInflator(new FriendlyNPCSpawnerInflator(env));
		addInflator(new GameItemContainerInflator(env));
		addInflator(new PickupInflator(env));
		addInflator(new MathNoteInflator(env));
		addInflator(new GameItemInflator(env));
		addInflator(new SavePortalInflator(env));
		addInflator(new RestorationInflator());
		addInflator(new FixedCameraInflator());
		addInflator(new TargetInflator(env));
		addInflator(new SimplePortalInflator(env));
	}

}
